package com.bt.springboot.common.exception;

import com.bt.springboot.common.enums.ResultEnum;
import lombok.Getter;

/**
 * @author zkx
 * @Date 2022/10/17 10:49
 */
@Getter
public class BusinessException extends RuntimeException{

	private final int code;

	private final String errMsg;

	public BusinessException(ResultEnum resultEnum) {
		this.code = resultEnum.getCode();
		this.errMsg = resultEnum.getMsg();
	}

}

